package com.oracle.client;

import com.oracle.context.suport.BeanFactory;
import com.oracle.context.suport.ClassPathXmlApplicationContext;
import com.oracle.model.Student;
import com.oracle.service.StudentService;

public class Test {
	public static void main(String[] args) throws Exception {
//		StudentService ss = new StudentService();
		Student student = new Student();
		student.setId(1);
		student.setName("xxx");
//		ss.addStudent(student);
		//Ioc(DI)
		BeanFactory beanFactory = new ClassPathXmlApplicationContext();
		StudentService service = (StudentService) beanFactory.getBean("studentService");
		service.addStudent(student);
//		service.addStudent(student);
		
	}
}
